package com.dc.datacollect.controller;

import com.dc.datacollect.conduit.R;
import com.dc.datacollect.entity.CollectGroup;
import com.dc.datacollect.service.CollectGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/collectGroup")
public class CollectGroupController {
    @Autowired
    private CollectGroupService collectGroupService;
    @GetMapping("/getGroupByCollectId")
    public R getGroupByCollectId(@RequestParam("collectId") Long collectId) {
        List<Long> groupIds = collectGroupService.getGroupByCollectId(collectId);
        return R.ok("获取收集活动关联的收集组成功").data(groupIds);

    }
}
